<html>
  <head>
    <title>page6</title>
  </head>
  <script>
    setTimeout(function(){
      document.getElementById('anchorLink').click();
    },500);
  </script>
  <body>
    <div><a id="anchorLink" href="page2.html#anchor">go to another page</a></div>
  </body>
</html>
